package com.thread;

import java.util.concurrent.atomic.AtomicInteger;

public class AddCountThread extends Thread{
	private AtomicInteger count = new AtomicInteger(0);
	
	@Override
	public void run() {
		for (int i = 0; i < 10000; i++) {
			System.out.println(count.incrementAndGet());
		}
	}
	
	public static void main(String[] args) {
		AddCountThread at = new AddCountThread();
		Thread t1 = new Thread(at);
		Thread t2 = new Thread(at);
		Thread t3 = new Thread(at);
		t1.start();t2.start();t3.start();
	}
}
